<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
   <%@page import="it.polimi.travelDream.ejb.servlet.*" %>
 <%@page import="it.polimi.travelDream.entities.*" %>
   <jsp:useBean id="hmgr" class="it.polimi.travelDream.ejb.beans.HotelMgr" scope="session" />
   <jsp:useBean id="emgr" class="it.polimi.travelDream.ejb.beans.ExcursionMgr" scope="session" />
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>
		  	TravelDreamLogin
		</title>
		<link rel="stylesheet" type="text/css" href="style.css" />
  	</head>
  
  <body>
  	<div class="header">
  		<ul>
	  		<li>TravelDream</li>
		    Manage Packages
	    </ul>
  	</div>
  	
  	<div class="section">
  	 
	    <div class="nav">
	    	<ul>
	    		<li> <a href="StaffHome.jsp">Home</a></li>
	    		<li> <a href="BPManagement.jsp">Manage BasicProducts</a></li>
	    		<li class="cur"><a href="PManagement.jsp"> Manage Packages </a></li>
	    			<ul class="submenu">
						<li class="cur"> Create Package</li>
						<li>Remove Package</li>
					</ul>
					<% 
	    		Staff z = new Staff(0,false,"0","0","0","0","0");
	      		if (request.getSession().getAttribute("utente")!=null )
		    	{ 
	      			z=(Staff)request.getSession().getAttribute("utente");
		        }
	      		else
	      		{
	      			
	      		}
	    		if (z.isPermission())
	    		{
	    			out.println("<li><a href=StaffRegistration.jsp> Manage Staff </a></li>");
	    		}
		    	
	    
		    		%>
	    		<li> <a href="/TravelDreamSystemWeb/StaffLogoutServlet?session=0"> Logout </a></li>
	    	</ul>
	    </div>
	    
	    <div class="content">
	    	 <% 
	      if (request.getSession().getAttribute("utente")!=null )
		    	{ Staff u=(Staff)request.getSession().getAttribute("utente");
		    		System.out.println("ciao"+u.getId());
		    	
	    
		    		%>
	    	<form action="AddPackage" method="POST" id=form class=myform>
	    			<div class="spacer"></div>
	    			<fieldset>
	  					<legend>Insert a new name</legend>
	  						
	  						<div class="spacer"></div>
	  
		   			
			    			<label>Name
										<span class="small">Name of the new package</span>
							</label>
						  	<input class="in" type="text" name="name"  />		    
						    
						    <input class="button" type="submit" value="Next" />
	    			</fieldset>
			    
	    	</form>
	    	
	    		   <% 
	    	if (request.getAttribute("message") == null) 
		    	{ 
		    		%>
						<div></div>
					<% 
				} 
	    	else 
		    	{ 
		    		%>
						<div class="advice"><%=request.getAttribute("message")%></div>
					<% 
				} 
		%>
		
		</div>
<%
		} else { 
				response.sendRedirect("/TravelDreamSystemWeb/StaffLogin.jsp");
				%>
				
				
					<%
		}	
		%>
    </div>
    
    <div class="footer">
    	<ul>
	    	<li>TravelDream Company srl © All rights reserved</li>
		    <li>Terms of use | Contacts | Team </li>
	    </ul>
    </div>
    
  </body>
</html>